<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>


<body>


	<%-- <form:form action=" ${pageContext.request.contextPath}/user/edit/${user.user_ID }" modelAttribute="user"  method="post">
<table>
	<tr><td><spring:message code="user.name"/></td><td><form:input path="user_Name"/><form:errors path="user_Name"/></td></tr>
	<tr><td><spring:message code="user.pwd"/></td><td><form:input path="password"/><form:errors path="password"/></td></tr>
	<tr><td><spring:message code="user.age"/></td><td><form:input path="age"/><form:errors path="age"/></td></tr>
	<tr><td><spring:message code="user.remark"/></td><td><form:input path="remark"/><form:errors path="remark"/></td></tr>
	<tr><td><spring:message code="user.updUser"/></td><td><form:input path="updUser"/><form:errors path="updUser"/></td></tr>
	<tr><td><input type="submit" value="submit"></td></tr>
</table>
</form:form> --%>

	<div class="content">
		<div class="main-content">
			<ul class="nav nav-tabs">
				<li class="active"><a href="#home" data-toggle="tab">Profile</a></li>
				<li><a href="#profile" data-toggle="tab">Password</a></li>
			</ul>

			<div class="row">
				<div class="col-md-8">
					<br>

					<div id="myTabContent" class="tab-content">


						<div class="tab-pane active in" id="home">
							<form:form id="editForm"
								action=" ${pageContext.request.contextPath}/ti/edit/${tiVO.examTiId}"
								modelAttribute="tiVO" method="post">

								<div class="form-group">
									<label><spring:message code="ti.examSubjectId" /></label>
									<%-- <form:input path="examSubjectId" cssClass="form-control required" /><form:errors path="examSubjectId"/> --%>
									<form:select path="examSubjectId" 
										cssClass="form-control required" items="${subject }"></form:select>
								</div>
								<div class="form-group">
									<label><spring:message code="ti.tiId" /></label>
									<form:input path="examTiId" cssClass="form-control required" />
									<form:errors path="examTiId" />
								</div>

								<div class="form-group">
									<label><spring:message code="ti.tiName" /></label>
									<form:textarea path="examTiName"
										cssClass="form-control {required:true}" />
									<form:errors path="examTiName" />
								</div>

								<div class="form-group">
									<label><spring:message code="ti.optionA" /></label>
									<form:input path="examTiOptiona"
										cssClass="form-control required" />
									<form:errors path="examTiOptiona" />
								</div>

								<div class="form-group">
									<label><spring:message code="ti.optionB" /></label>
									<form:input path="examTiOptionb"
										cssClass="form-control required" />
									<form:errors path="examTiOptionb" />
								</div>

								<div class="form-group">
									<label><spring:message code="ti.optionC" /></label>
									<form:input path="examTiOptionc"
										cssClass="form-control required" />
									<form:errors path="examTiOptionc" />
								</div>

								<div class="form-group">
									<label><spring:message code="ti.optionD" /></label>
									<form:input path="examTiOptiond"
										cssClass="form-control required" />
									<form:errors path="examTiOptiond" />
								</div>

								<div class="form-group">
									<label><spring:message code="ti.key" /></label>
									<form:input path="examTiKey"
										cssClass="form-control {required:true}" />
									<form:errors path="examTiKey" />
								</div>

								<div class="form-group">
									<label><spring:message code="ti.point" /></label>
									<form:input path="examTiPoint" cssClass="form-control required" />
									<form:errors path="examTiPoint" />
								</div>

								<div class="form-group">
									<label><spring:message code="ti.difficulty" /></label>
									<%-- <form:input path="examTiDifficulty" cssClass="form-control required" /><form:errors path="examTiDifficulty"/> --%>
									<form:select path="examTiDifficulty" items="${tiDiff}"
										cssClass="form-control required" />
								</div>

								<div class="form-group">
									<label><spring:message code="ti.tiType" /></label>
									<%-- <form:input path="examTiId" cssClass="form-control required" /><form:errors path="examTiId"/> --%>
									<form:select path="examTiType" cssClass="form-control required"
										items="${tiType }"></form:select>
								</div>



								<div class="btn-toolbar list-toolbar">
									<button class="btn btn-primary">
										<i class="fa fa-save"></i> Update
									</button>
								</div>
							</form:form>
						</div>

						<div class="tab-pane fade" id="profile">

							<form id="tab2">
								<div class="form-group">
									<label>New Password</label> <input type="password"
										class="form-control">
								</div>
								<div>
									<button class="btn btn-primary">Update</button>
								</div>
							</form>
						</div>
					</div>


				</div>
			</div>
			<script type="text/javascript">
				$(function() {
					$("#datepicker").datepicker({
						dateFormat : 'yy-mm-dd'
					});

				});

				$().ready(function() {
					$("#editForm").validate({
						errorPlacement : function(error, element) {
							error.appendTo(element.prev());
						}
					});
				});
			</script>
</body>
</html>